import { request } from '@boeyo/portal';

export const getAlarmList = (params: any) => {
  // return request({
  //   url: '/Push/list',
  //   method: 'get',
  //   params,
  // });
  return {
    rows: [
      {
        id: 1,
        alarmType: '0',
        alarmLevel: '0',
        color: '#EEB631',
        alarmObj: '101.43.172.33',
        noticeType: '0,1',
        noticeGroup: '0,1',
        createTime: '2021-01-01 00:00:00',
        desc: '【内存使用率】实际【88%】大于阈值【80%】且在【10小时】内重复触发【5】次超过阈值【4】次',
        status: '0',
        updateTime: '2021-01-01 00:00:00',
      },
      {
        id: 2,
        alarmType: '1',
        alarmLevel: '1',
        color: '#810000',
        noticeGroup: '0,1',
        desc: '【内存使用率】实际【88%】大于阈值【80%】且在【10小时】内重复触发【5】次超过阈值【4】次',
        alarmObj: '101.43.172.43',
        noticeType: '0,1',
        status: '1',
        createTime: '2021-01-01 00:00:00',
      },
    ],
    total: 1,
  };
};

export const restoreAlarm = (ids) => {
  return request({
    url: `/push/restore/ids=${ids}`,
    method: 'PUT',
  });
};
